package busca.tesoros.uclm;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.Socket;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;



import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

public class IpServidorActivity extends Activity implements OnClickListener{

	private Button  IpOk;
	public String IpServer;
	
	public void onCreate (Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
        setContentView(R.layout.ipservidor);
        
        IpOk= (Button)findViewById(R.id.ipOk);
        IpOk.setOnClickListener(comprobarIp); 
        
	}
	
	private OnClickListener comprobarIp = new OnClickListener()
	{
		public void onClick (View v)
		{
			switch(v.getId())
			{
			case R.id.ipServidor:
				startActivity(new Intent(getBaseContext(),LoginActivity.class));
				final EditText ip = (EditText) findViewById(R.id.ipServidor);
				IpServer = ip.getText().toString();
				break;
			case R.id.ipOk:
			}
		}
	};
	

	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		
	}
	
	public String IpServ()
	{
		return IpServer;
		
	}
	
	

}
